#ifndef CSHOWPICTURE_H
#define CSHOWPICTURE_H

#include <QWidget>

class CShowPicture : public QWidget
{
    Q_OBJECT
public:
    explicit CShowPicture(const QPixmap &pic, QWidget *parent = nullptr);
    ~CShowPicture();

protected:
    void paintEvent(QPaintEvent *event)override;
    void mousePressEvent(QMouseEvent *event)override;
    void mouseReleaseEvent(QMouseEvent *event)override;
    void mouseMoveEvent(QMouseEvent *event)override;
    void keyPressEvent(QKeyEvent *event) override;
private:
    void init();

signals:

    //members
private:
    bool m_bMousePress;
    QPoint m_MovePoint;
    QPixmap m_Picture;
};

#endif // CSHOWPICTURE_H
